package com.xquant.pricing.pricingConfig.service.impl;

import com.github.pagehelper.PageInfo;
import com.xquant.pricing.pricingConfig.mapper.CalendarMapper;
import com.xquant.pricing.pricingConfig.service.CalendarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author ershuai.zhao
 * @Date: 24/12/2019 10:17
 * @Description:
 */
@Service(CalendarService.BEAN_NAME)
public class CalendarServiceImpl implements CalendarService {

    @Autowired
    private CalendarMapper calendarMapper;

    @Override
    public String getBussinessDate(Map<String,Object> params) {
        String list = calendarMapper.getBussinessDate(params);
        return list;
    }
    @Override
    public List<Map<String, Object>> getCalendarList(Map<String, Object> params){
        return   calendarMapper.getCalendarList(params);
    }

    @Override
    public PageInfo<Map> getCalendarByPage(Map map) {
        List<Map> list = calendarMapper.getCalendarByPage(map);
        return new PageInfo<>(list);
    }

    @Override
    public void updateCalendar(Map map) {
        calendarMapper.updateCalendar(map);
    }
}
